	<title>版本菜单设置</title>
	<style>
	</style>
	<link rel="stylesheet" type="text/css" href="__STATIC__/js/layui256/layui/css/layui.css">
</head>
<body>
	<div class="layui-tab">
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-body">
					<div id="menu-tree"></div>
				</div>
			</div>
		</div>
	</div>
<script src="__STATIC__/js/jquery.js"></script>
<script src="__STATIC__/js/layui256/layui/layui.all.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script>
var data = {$list};
var tree = null ;
layui.use( 'tree' , function(){
	tree = layui.tree;
	var indexTree = tree.render({
		elem: "#menu-tree",
		data:data,
		id:'menu-tree',
		showLine:false,
		showCheckbox: true,
		onlyIconControl:false,
	});
} );

var getChecked = function(){
	var list = tree.getChecked('menu-tree');
	var menus = [];
	var getMenu = function( list ){
		$.each( list , function( key , item ){
			menus.push( item.id );
			if( item.children.lenth != 0  ){
				var tmp = getMenu( item.children );
				menus.concat( tmp );
			}
		});
	}
	$menus = getMenu( list );
	return menus;
}

</script>
</body>
</html>